﻿@model Nop.Plugin.Widgets.NivoSlider.Models.PublicInfoModel

@{
    var pictureUrl = ViewData["pictureUrl"]?.ToString() ?? "";
    var link = ViewData["link"]?.ToString() ?? "";
    var dataTransition = ViewData["dataTransition"]?.ToString() ?? "";
    var text = ViewData["text"]?.ToString() ?? "";
    var alttext = ViewData["alttext"]?.ToString() ?? "";

    if (!string.IsNullOrEmpty(pictureUrl))
    {
        if (!string.IsNullOrEmpty(link))
        {
            <a href="@link" aria-label="@alttext">
                <img src="@pictureUrl" data-thumb="@pictureUrl" data-transition="@dataTransition" alt="@alttext" title="@text" />
            </a>
        }
        else
        {
            <img src="@pictureUrl" data-thumb="@pictureUrl" data-transition="@dataTransition" alt="@alttext" title="@text" />
        }
    }
}